package org.qqcui.designpattern.patterns.watcher.traditional;

/**
 * 当前数据展示类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/6 14:57
 **/
public class CurrentConditions {

    /**
     * 温度
     */
    private float temperatrue;

    /**
     * 湿度
     */
    private float humidity;

    /**
     * 气压
     */
    private float pressure;

    public void update(float temperatrue, float pressure, float humidity) {
        this.temperatrue = temperatrue;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    private void display() {
        System.out.println("***Today Temperature: " + temperatrue + "***");
        System.out.println("***Today Pressure: " + pressure + "***");
        System.out.println("***Today Humidity: " + humidity + "***");
    }
}
